{% extends "base.html" %}

{% block title %}
    权限管理
{% endblock %}

{% block head %}
    <h1 class="page-header">
        权限管理
        <a class="btn btn-default pull-right" href="/add_permission">添加</a>
    </h1>
{% endblock %}

{% block content %}
    <div class="col-lg-12">
        <table class="table">
            <thead>
            <tr>
                <th>名称</th>
                <th>描述</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {% for p in perm_list %}
            <tr>
                <td class="col-lg-4">{{ p.per_name }}</td>
                <td class="col-lg-4">{{ p.per_desc }}</td>
                <td class="col-lg-4">
                    <a href="/edit_permission/{{ p.id }}" class="btn btn-default">修改</a>
                    <a href="/delete_permission/{{ p.id }}" class="btn btn-default">删除</a>
                    <a class="btn btn-default" href="/position_permission/{{ p.id }}">关联职位</a>
                </td>
            </tr>
            {% endfor %}

            </tbody>
        </table>
    </div>
{% endblock %}